<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<meta charset="utf-8">
<title>Recovery Password</title>
<meta name="viewport"
	content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="apple-mobile-web-app-capable" content="yes">

<!--  Style Sheet -->
<link href="resources/signin/css/bootstrap.min.css" rel="stylesheet"
	type="text/css" />
<link href="resources/signin/css/bootstrap-responsive.min.css"
	rel="stylesheet" type="text/css" />

<link href="resources/signin/css/font-awesome.css" rel="stylesheet">
<link
	href="http://fonts.googleapis.com/css?family=Open+Sans:400italic,600italic,400,600"
	rel="stylesheet">

<link href="resources/signin/css/style.css" rel="stylesheet"
	type="text/css">
<link href="resources/signin/css/signin.css" rel="stylesheet"
	type="text/css">
<link rel="stylesheet"
	href="//code.jquery.com/ui/1.11.1/themes/smoothness/jquery-ui.css">

<!--  Java Script -->
<script src="//code.jquery.com/jquery-1.10.2.js"></script>
<script src="//code.jquery.com/ui/1.11.1/jquery-ui.js"></script>
<script type="text/javascript" src="resources/signin/js/signin.js"></script>
<script type="text/javascript"
	src="resources/signin/js/bootstrap.min.js"></script>
<script type="text/javascript"
	src="resources/signin/js/jquery.validate.min.js"></script>
</head>
<style>

label.error {
	font-weight: bold;
	color: red;
	padding: 2px 8px;
	margin-top: 2px;
}
</style>
</head>
<body>

	<div class="navbar navbar-fixed-top">

		<div class="navbar-inner">

			<div class="container">

				<a class="btn btn-navbar" data-toggle="collapse"
					data-target=".nav-collapse"> <span class="icon-bar"></span> <span
					class="icon-bar"></span> <span class="icon-bar"></span>
				</a>
				<h1 class="brand" style="font-style: italic; font-size: 40px">
					CSC Viet Nam eBanking</h1>
			</div>
			<!-- /container -->

		</div>
		<!-- /navbar-inner -->

	</div>
	<!-- /navbar -->

	<div style="margin-left: 30px; margin-top: 15px;">
		<h2>We need some information to verify your account</h2>
	</div>
	<hr style="color: black;">
	<div class="account-container">
		<div class="content clearfix">
			<form action="requestresetpassword.html" method="post"
				id="resetPassword">
				<div class="login-fields">
					<p>This protects your account from unauthorized access</p>
					<div class="field">
						<label for="username">Username:</label> <input type="text"
							id="username" name="txtUsername" value="" placeholder="Username"
							class="login username-field" />
					</div>
					<!-- /field -->
					<!-- <div class="field">
						<label for="email">Email:</label> <input type="email" id="email"
							name="txtEmail" value="" placeholder="Email Address"
							class="login email-field" />-->
					<input type="hidden" id="txtCurentDate" name="txtCurentDate"
						value="" class="" readonly="readonly" />
					<!-- /password -->
					<div class="field" style="font-size: 14px; color: black;">
						<p>What problems are you having with your CSC account:</p>
						<input type="radio"
							style="clear: both; width: 15px; display: inline;"
							name="txtReason" value="I have forgot my password"
							checked="checked" id="reason1"> I have forgot my password
						<br> <input type="radio"
							style="clear: both; width: 15px; display: inline;"
							name="txtReason"
							value="My account may have been compromised"
							id="reason2"> My account may have been compromised <br>
						<input type="radio"
							style="clear: both; width: 15px; display: inline;"
							name="txtReason" value="" id="otherreason">Other Reasons:
						<div class="controls" id="panelReason"
							style="margin-top: 15px; display: none;">
							<textarea style="resize: none; width: 310px;" name="txtMessage"
								id="txtMessage"> </textarea>
						</div>
					</div>
					<!-- /Reason -->
				</div>
				<!-- /login-fields -->
				<c:if test="${messageNoAccount != null}">
					<div class="alert alert-danger" style="color: #B94A48">
						<p>${messageNoAccount}</p>
					</div>
				</c:if>
				<div class="login-actions">
					<button class="button btn btn-success btn-large" type="submit"
						id="btnSendRequest" style="background-color: grey">Send
						Request</button>
				</div>
				<input type="hidden" id="messageReturn" value="${messageResult}" />

				<!-- .actions -->
				<div class="login-extra" style="color: black">
					Suddently remember your password? <a href="login.html">Login
						now</a>
				</div>
			</form>
		</div>
		<!-- /content -->
	</div>
	<!-- /account-container -->

	<!--  Dialog Message-->
	<div id="dialog-message" title="Reset Password"
		style="display: none; font-size: 16px;">
		<p>
			<span class="ui-icon ui-icon-circle-check"
				style="float: left; margin: 0 7px 50px 0;"></span> ${messageResult}
		</p>
	</div>
	<!--  End - Dialog Message-->
</body>
<script type="text/javascript">
	$("#btnSendRequest").click(function() {
		var message = $("#txtMessage").val();
		document.getElementById("otherreason").value = message;
	});

	$(document).ready(
			function() {
				$('#resetPassword').validate(
						{
							rules : {
								txtUsername : {
									required : true
								}
							},
							messages : {
								txtUsername : {
									required : "What's your username?"
								}
							},
							highlight : function(element) {
								$(element).closest('.field').removeClass(
										'success').addClass('error');
							},
							success : function(element) {
								element.text('').addClass('valid').closest(
										'.field').removeClass('error')
										.addClass('success');
							}
						});
			});

	var message = $("#messageReturn").val();

	if (message != "") {
		$(function() {
			$("#dialog-message").dialog({
				modal : true,
				width : 600,
				height : 'auto',
				fluid : true, //new option
				resizable : false,
				buttons : {
					Ok : function() {
						$(this).dialog("close");
					}
				}
			});
		});
	}

	// Other reasons
	$("#otherreason").click(function() {
		$("#panelReason").slideDown("slow");
	});

	$("#reason1").click(function() {
		$("#panelReason").slideUp("slow");
	});

	$("#reason2").click(function() {
		$("#panelReason").slideUp("slow");
	});
	// End - Other reasons
</script>
</html>